//
//  main.m
//  numberDemo
//
//  Created by zhouxiaobo on 15/10/25.r
//  Copyright © 2015年 mapath. All rights reserved.
//

#import <Foundation/Foundation.h>

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        NSNumber *intNumber = [[NSNumber alloc]initWithInt:5];
        NSNumber *charNmber = [[NSNumber alloc]initWithChar:'C'];
        NSNumber *floatNumber = [[NSNumber alloc]initWithFloat:67.0];
        NSNumber *doubleNumber = [[NSNumber alloc]initWithDouble:6.7];
        
        NSNumber *intNumber2 = [[NSNumber alloc]initWithInt:5];
        
        BOOL flag = [intNumber2 isEqualToNumber:intNumber];
        NSLog(@"%d",flag);
        
        NSComparisonResult result = [intNumber2 compare:intNumber];
        
        switch (result) {
            case NSOrderedAscending:
                NSLog(@"<");
                break;
            case NSOrderedDescending:
                NSLog(@">");
                break;
            default:
                NSLog(@"=");
                break;
        }
        
        int a = [intNumber intValue];
        char c = [charNmber charValue];
        float f = [floatNumber floatValue];
        double d = [doubleNumber doubleValue];
        
        NSLog(@"%d,%c,%f,%lf",a,c,f,d);
    }
    return 0;
}
